import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code3 {
    public static boolean check(boolean[][] hash,int left,int right) {
        for(int i=0;i<26;i++) {
            if(hash[left][i]&&hash[right][i]) return true;
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while(t--!=0) {
            int n = in.nextInt();
            boolean[][] hash = new boolean[n][26];//第i个字符串第j个字符是否出现
            for(int i=0;i<n;i++) {
                char[] s = in.next().toCharArray();
                for(char ch:s) {
                    hash[i][ch-'a'] = true;
                }
            }
            int left=0,right=n-1;
            while(left<right) {
                if(check(hash,left,right)) {
                    left++;
                    right--;
                } else break;

            }
            if(left>=right) System.out.println("Yes");
            else System.out.println("No");
        }
    }
}